﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;
using System.Net;
using System.IO;
using System.Text;
using DAL;
using Model;

namespace UI
{
    public partial class share : System.Web.UI.Page
    {
        public ActiveInfo active = new ActiveInfo();
        public UserInfo uinfo = new UserInfo();
        public UserInfo pinfo = new UserInfo();
        public double prizemoney = 0;
        public bool hastake = false;
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = DataConvert.ToInt(DESEncrypt.Decrypt(JobRequest.GetRequestString("id")));
            int userid = DataConvert.ToInt(DESEncrypt.Decrypt(JobRequest.GetRequestString("userid")));
            uinfo = UserDAL.FindOneByID(userid);
            active = ActiveDAL.FindOneByID(id);
            pinfo = UserDAL.FindOneByID(active.UserID);
            prizemoney = PrizeRecordDAL.PrizeMoney(active.ID, uinfo.ID);
            if (prizemoney > 0) { hastake = true; }
            prizemoney = DataConvert.ToDouble(CookieHelper.GetCookie("prizemoney"));
        }
    }
}